<?xml version='1.0' encoding='UTF-8' ?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml"
      xmlns:ui="http://java.sun.com/jsf/facelets"
      xmlns:p="http://primefaces.org/ui"
      xmlns:h="http://java.sun.com/jsf/html"
      xmlns:f="http://java.sun.com/jsf/core"
      xmlns:c="http://java.sun.com/jsp/jstl/core">

    <body>

        <ui:composition template="./template.xhtml">

            <ui:define name="content">
                <h:form id="form">

                    <p:dataGrid var="spot" value="#{wizardBean.listSpots()}" columns="1"
                                rows="9" paginator="true"
                                paginatorTemplate="{CurrentPageReport}  {FirstPageLink} {PreviousPageLink} {PageLinks} {NextPageLink} {LastPageLink} {RowsPerPageDropdown}">

                        <p:panel header="#{spot.name}" style="font-size: 15pt">
                                <div class="spotImage" >
                                    <p:graphicImage styleClass="spotImg" value="/pictures/#{spot.pic}"/> 
                                </div>
                                <div class="spotInfo">
                                    <div class="spottedby"><h:outputText value="Spotted By: " />
                                        <h:outputLink value="viewuser.xhtml">#{spot.username.username}
                                            <f:param name="username" value="#{spot.username.username}"/>
                                        </h:outputLink>
                                    </div><br /><br />
                                    <div><h:outputText class="note" value="Note : #{spot.note}" /></div>
                                    <div>
                                        <h:outputLink value="viewrestaurant.xhtml">#{spot.rid.name}
                                            <f:param name="restId" value="#{spot.rid.rid.toString()}"/>
                                        </h:outputLink>
                                    </div>
                                </div>
                                <div class="clear"></div>
                            </p:panel>

                    </p:dataGrid>
                </h:form>

            </ui:define>

        </ui:composition>

    </body>
</html>
